/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.dp.vo;

import java.io.Serializable;
import java.math.BigInteger;
import java.util.Date;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author wyr
 */
@Entity
@Table(name = "t_user_order")
//@NamedQueries({@NamedQuery(name = "TUserOrder.findAll", query = "SELECT t FROM TUserOrder t"), @NamedQuery(name = "TUserOrder.findById", query = "SELECT t FROM TUserOrder t WHERE t.id = :id"), @NamedQuery(name = "TUserOrder.findByServiceCode", query = "SELECT t FROM TUserOrder t WHERE t.serviceCode = :serviceCode"), @NamedQuery(name = "TUserOrder.findByContentid", query = "SELECT t FROM TUserOrder t WHERE t.contentid = :contentid"), @NamedQuery(name = "TUserOrder.findBySourceid", query = "SELECT t FROM TUserOrder t WHERE t.sourceid = :sourceid"), @NamedQuery(name = "TUserOrder.findByPhonenum", query = "SELECT t FROM TUserOrder t WHERE t.phonenum = :phonenum"), @NamedQuery(name = "TUserOrder.findByCreatetime", query = "SELECT t FROM TUserOrder t WHERE t.createtime = :createtime"), @NamedQuery(name = "TUserOrder.findByOrdertime", query = "SELECT t FROM TUserOrder t WHERE t.ordertime = :ordertime"), @NamedQuery(name = "TUserOrder.findByOrdertype", query = "SELECT t FROM TUserOrder t WHERE t.ordertype = :ordertype"), @NamedQuery(name = "TUserOrder.findByCanceltime", query = "SELECT t FROM TUserOrder t WHERE t.canceltime = :canceltime"), @NamedQuery(name = "TUserOrder.findByOrdersource", query = "SELECT t FROM TUserOrder t WHERE t.ordersource = :ordersource"), @NamedQuery(name = "TUserOrder.findByAreaid", query = "SELECT t FROM TUserOrder t WHERE t.areaid = :areaid")})
public class TUserOrder implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "id")
    private Integer id;
    @Column(name = "sercvice_code")
    private String serviceCode;
    @Column(name = "contentid")
    private BigInteger contentid;
    @Column(name = "sourceid")
    private String sourceid;
    @Column(name = "phonenum")
    private String phonenum;
    @Column(name = "createtime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date createtime;
    @Column(name = "ordertime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date ordertime;
    @Column(name = "ordertype")
    private Integer ordertype;
    @Column(name = "canceltime")
    @Temporal(TemporalType.TIMESTAMP)
    private Date canceltime;
    @Column(name = "ordersource")
    private String ordersource;
    @Column(name = "areaid")
    private Integer areaid;

    public TUserOrder() {
    }

    public TUserOrder(Integer id) {
        this.id = id;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(String serviceCode) {
        this.serviceCode = serviceCode;
    }

    public BigInteger getContentid() {
        return contentid;
    }

    public void setContentid(BigInteger contentid) {
        this.contentid = contentid;
    }

    public String getSourceid() {
        return sourceid;
    }

    public void setSourceid(String sourceid) {
        this.sourceid = sourceid;
    }

    public String getPhonenum() {
        return phonenum;
    }

    public void setPhonenum(String phonenum) {
        this.phonenum = phonenum;
    }

    public Date getCreatetime() {
        return createtime;
    }

    public void setCreatetime(Date createtime) {
        this.createtime = createtime;
    }

    public Date getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(Date ordertime) {
        this.ordertime = ordertime;
    }

    public Integer getOrdertype() {
        return ordertype;
    }

    public void setOrdertype(Integer ordertype) {
        this.ordertype = ordertype;
    }

    public Date getCanceltime() {
        return canceltime;
    }

    public void setCanceltime(Date canceltime) {
        this.canceltime = canceltime;
    }

    public String getOrdersource() {
        return ordersource;
    }

    public void setOrdersource(String ordersource) {
        this.ordersource = ordersource;
    }

    public Integer getAreaid() {
        return areaid;
    }

    public void setAreaid(Integer areaid) {
        this.areaid = areaid;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (id != null ? id.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TUserOrder)) {
            return false;
        }
        TUserOrder other = (TUserOrder) object;
        if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.dp.vo.TUserOrder[id=" + id + "]";
    }

}
